<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/workbusiness/upper_ftpmachiningcenter.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/system/workbusiness/upper_ftpmachiningcenter.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ftp_id',
                footer: "Foots",
                cnName: '加工中心',
                name: 'workbusiness/upper_ftpmachiningcenter',
                url: "/upper_ftpmachiningcenter/",
                sortName: "ftp_id"
            });
            const editFormFields = ref({"work_order_id":"","mold_number":"","workpiece_name":"","workpiece_size":"","x_touches":"","y_touches":"","z_touches":"","clamping_method":"","coordinate_name":"","z_max":"","z_min":"","processing_machines":"","program":"","processing_time":""});
            const editFormOptions = ref([[{"dataKey":"工单","data":[],"title":"工单号","field":"work_order_id","type":"select"},
                              {"title":"模具编号","field":"mold_number","type":"text"},
                               {"title":"工件名称","field":"workpiece_name","type":"text"}],
                              [{"title":"工件尺寸","field":"workpiece_size","type":"text"},
                               {"title":"X碰数","field":"x_touches","type":"text"},
                               {"title":"Y碰数","field":"y_touches","type":"text"},
                               {"title":"Z碰数","field":"z_touches","type":"text"}],
                              [{"title":"夹装方式","field":"clamping_method","type":"text"},
                               {"title":"坐标系名","field":"coordinate_name","type":"text"},
                               {"title":"Z最大值","field":"z_max","type":"text"},
                               {"title":"Z最小值","field":"z_min","type":"text"}],
                              [{"title":"加工机台","field":"processing_machines","type":"text"},
                               {"title":"编程","field":"program","type":"text"},
                               {"title":"加工时间","field":"processing_time","type":"text"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'ftp_id',title:'主键',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'work_order_id',title:'工单号（外键）',type:'int',bind:{ key:'工单',data:[]},width:110,hidden:true,readonly:true,align:'left'},
                       {field:'mold_number',title:'模具编号',type:'string',width:220,align:'left',sort:true},
                       {field:'workpiece_name',title:'工件名称',type:'string',width:220,align:'left'},
                       {field:'workpiece_size',title:'工件尺寸',type:'string',width:220,align:'left'},
                       {field:'x_touches',title:'X碰数',type:'string',width:220,align:'left'},
                       {field:'y_touches',title:'Y碰数',type:'string',width:220,align:'left'},
                       {field:'z_touches',title:'Z碰数',type:'string',width:220,align:'left'},
                       {field:'clamping_method',title:'夹装方式',type:'string',width:220,align:'left'},
                       {field:'coordinate_name',title:'坐标系名',type:'string',width:220,align:'left'},
                       {field:'z_max',title:'Z最大值',type:'string',width:220,align:'left'},
                       {field:'z_min',title:'Z最小值',type:'string',width:220,align:'left'},
                       {field:'processing_machines',title:'加工机台',type:'string',width:220,align:'left'},
                       {field:'program',title:'编程',type:'string',width:220,align:'left'},
                       {field:'processing_time',title:'加工时间',type:'string',width:220,align:'left'},]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
